package com.ruicar.afs.cloud.account.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.account.enums.rules.AtomOperatorScopeType;
import com.ruicar.afs.cloud.common.modules.contract.enums.AtomComponentType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class VoucherAtomVo  {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id ;

    @ApiModelProperty("原子key")
    private String atomKey ;

    @ApiModelProperty("原子名称")
    @NotBlank(message = "原子名称不能为空")
    private String atomName ;

    @ApiModelProperty("可用操作符范围;all-所有 cust-自定义")
    @NotNull(message = "原子操作符范围不能为空")
    private AtomOperatorScopeType atomOperatorScope;

    @ApiModelProperty("原子取值表达式")
    @NotBlank(message = "原子取值表达式不能为空")
    private String atomValueExpress ;

    @ApiModelProperty("原子类型")
    @NotNull(message = "原子类型不能为空")
    private AtomComponentType atomType ;

    @NotNull(message = "适用场景不能为空")
    List<String> relList;

    List<String> operatorKeyList;
}
